﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Iudicium.Autenticacion;
using log4net;

public partial class UserControls_Report_ReportTramiteUtility : System.Web.UI.UserControl
{
    private static readonly ILog log = LogManager.GetLogger("LogFile");

    public bool Paginar
    {
        get { return TramiteUtilityGridView.AllowPaging; }
        set { TramiteUtilityGridView.AllowPaging = true; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        UsuarioIdHiddenField.Value = Iudicium.Autenticacion.Autenticacion.GetCurrentUserId().ToString();
        TienePermisoHiddenField.Value = (Autenticacion.TienePermisos("VER_TRAMITES")).ToString();
    }

    protected void TramiteUtilityDataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        if (e.Exception != null)
        {
            log.Error("No se pudo obtener la lista de Utilidades de Tramites", e.Exception);
            e.ExceptionHandled = true;
        }
    }
}
